/**
 * 
 */
package com.gragra.sampling.sequentialStructure.tests;

import static org.junit.Assert.*;
import org.junit.Before;
import org.junit.Test;
import com.gragra.sampling.sequentialStructure.CaseLevel;
import com.gragra.sampling.sequentialStructure.ExtensionInformationHolder;
import com.gragra.sampling.sequentialStructure.ExtensionLevels;
import com.gragra.sampling.sequentialStructure.WordType;

/**
 * @author Christoph Teichmann
 * created Mar 26, 2013 8:27:29 PM
 * @version 0.1
 */
public class TestExtensionInformationHolder
{
	/**
	 * 
	 */
	private ExtensionInformationHolder eih;
	/**
	 *
	 * @throws java.lang.Exception
	 */
	@Before
	public void setUp() throws Exception
	{eih = new ExtensionInformationHolder(10);}
	/**
	 * Test method for {@link com.gragra.sampling.sequentialStructure.ExtensionInformationHolder#addInformation(int, com.gragra.sampling.sequentialStructure.ExtensionInformationLevel, com.gragra.sampling.sequentialStructure.ExtensionInformationValue)}.
	 */
	@Test
	public final void testAddInformationIntExtensionInformationLevelExtensionInformationValue()
	{
		eih.addInformation(2, ExtensionLevels.CaseTypeLevel, CaseLevel.CamelCase);
		eih.addInformation(1, ExtensionLevels.CaseTypeLevel, CaseLevel.CamelCase);
		eih.addInformation(2, ExtensionLevels.CaseTypeLevel, CaseLevel.UpperCase);
		eih.addInformation(2, ExtensionLevels.WordTypeLevel, WordType.Noun);
		eih.addInformation(2, ExtensionLevels.ContextTagLevel, 1);
		assertEquals(eih.getFiniteInformation(0, ExtensionLevels.CaseTypeLevel),null);
		assertEquals(eih.getFiniteInformation(1, ExtensionLevels.CaseTypeLevel),CaseLevel.CamelCase);
		assertEquals(eih.getFiniteInformation(2, ExtensionLevels.CaseTypeLevel),CaseLevel.UpperCase);
		assertEquals(eih.getFiniteInformation(2, ExtensionLevels.WordTypeLevel),WordType.Noun);
		assertEquals(eih.getInfiniteInformation(2, ExtensionLevels.ContextTagLevel),1);
		assertEquals(eih.getInfiniteInformation(0, ExtensionLevels.ContextTagLevel),-1);
		
	}
}